#ifndef _MY_CHARS_H__
#define _MY_CHARS_H__

#include <linux/sysfs.h>

#define MYCHAR_DEVICE_NAME	"mychars"

#define MYCHAR_CMD_

static struct class_attribute gpio_class_attrs[] = {
    __ATTR(cmd, S_IRUGO | S_IWUSR, NULL, gpio_cmd_restore),
    __ATTR(powerkey_led_ctrl, S_IRUGO | S_IWUSR, aml_gpio_attr_powerkey_led_ctrl_show, aml_gpio_attr_powerkey_led_ctrl_store),
    __ATTR_NULL,
};


tatic struct class gpio_class = {
        .name = MYCHAR_DEVICE_NAME,
        .class_attrs = gpio_class_attrs,
    };

static  spinlock_t  gpio_lock = SPIN_LOCK_UNLOCKED;

static  gpio_t  am_gpio = {
    .cla = NULL,
    .dev = NULL,
    .major = -1,
};
static struct uio_info gpio_uio_info = {
    .name = "gpio_uio",
    .version = "0.1",
    .irq = UIO_IRQ_NONE,

    .mem = {
        [0] = {
            .memtype = UIO_MEM_PHYS,
            .addr = (IO_CBUS_PHY_BASE + CBUS_REG_OFFSET(PREG_PAD_GPIO0)),
            .size = (PREG_PAD_GPIO5 - PREG_PAD_GPIO0 + 1) * 4,
        },
    },
};

#endif
